package cn.edu.scujcc.customofsichuan;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class Second_fsj extends AppCompatActivity implements View.OnClickListener{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second_fsj);
        Toolbar back = findViewById(R.id.back_secondPage_fsj);
        back.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        View fsj_history = findViewById(R.id.fsj_history);
        View fsj_activity = findViewById(R.id.fsj_activity);
        View fsj_protect = findViewById(R.id.fsj_protect);

        fsj_history.setOnClickListener(this);
        fsj_activity.setOnClickListener(this);
        fsj_protect.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        Intent intent=new Intent(this,thirdPage_Detail.class);
        Bundle bundle=new Bundle();

        switch (v.getId()){
            case R.id.fsj_history:
                bundle.putString("title","放水节历史渊源");
                bundle.putString("webUrl","file:///android_asset/fsj_history.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;
            case R.id.fsj_activity:
                bundle.putString("title","放水节相关活动");
                bundle.putString("webUrl","file:///android_asset/fsj_activity.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;
            case R.id.fsj_protect:
                bundle.putString("title","放水节传承保护");
                bundle.putString("webUrl","file:///android_asset/fsj_value.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;



        }
    }
}